import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import {beforeOperate, fun_GetImgCode, postRequest} from "./util/api";
import {getRequest} from "./util/api";
import {putRequest} from "./util/api";
import {deleteRequest} from "./util/api";
import axios from "axios";
import qs from 'qs';

Vue.config.productionTip = false

Vue.prototype.$qs = qs;

Vue.prototype.postRequest = postRequest;
Vue.prototype.getRequest = getRequest;
Vue.prototype.putRequest = putRequest;
Vue.prototype.deleteRequest = deleteRequest;
Vue.prototype.fun_GetImgCode = fun_GetImgCode;
Vue.prototype.beforeOperate = beforeOperate;

// axios.defaults.withCredentials = true;
Vue.prototype.$axios = axios;

Vue.use(ElementUI)

// axios.defaults.baseURL = '/api'
// axios.defaults.headers['Content-Type']='application/x-www-form-urlencoded'

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
